<template>
  <div>
    <div class="detail_box">
      <ul>
        <li>
          <div class="wrapper">
            <div>
              <img :src="img" />
              <div class="title">
                <div class="text">
                  <div>
                    <span>{{phone}}</span>
                    <van-rate readonly v-model="star" size="14.5px" style="margin-left:8px;" />
                  </div>
                </div>
                <div class="course">{{title}}</div>
              </div>
            </div>
            <div class="times">{{time | date}}</div>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import moment from "moment";
export default {
  data() {
    return {
      //   value: 3,
    };
  },
  props: {
    img: {
      default:
        "https://msmk2019.oss-cn-shanghai.aliyuncs.com/uploads/avatar.jpg",
      type: String,
    },
    phone: {
      default: "185****0487",
      type: String,
    },
    star: {
      default: 0,
      type: Number,
    },
    time: {
      default: "2020-03-03 11:16",
      type: String,
    },
    title: {
      default: "",
      type: String,
    },
  },
  filters: {
    date(date) {
      return `${moment(date * 1000).format('YYYY-MM-DD HH:mm')}`;
    },
  },
};
</script>

<style lang="scss" scoped>
/deep/.van-rate__icon--full {
  color: rgb(234, 122, 47);
}
.detail_box {
  ul {
    list-style: none;
    li {
      padding: 20px 20px;
      .wrapper {
        display: flex;
        justify-content: space-between;
        > div {
          display: flex;
        }
        img {
          width: 7vw;
          height: 7vw;
          border-radius: 50%;
        }
        .title {
          margin-left: 20px;
          font-size: 28px;
          .text {
            display: flex;
            justify-content: space-around;
          }

          .course {
            padding-top: 1.33333vw;
            line-height: 6.4vw;
            color: #999;
            font-size: 25px;
            display: flex;
            // margin-left: 30px;
          }
        }

        .times {
          font-size: 24.5px;
          color: #999;
          text-align: right;
        }
      }
    }
  }
}
</style>